//
//  APPLEEmoticon.swift
//  123
//
//  Created by pangjiaxing on 16/1/14.
//  Copyright © 2016年 pangjiaxing. All rights reserved.
//

import UIKit

class APPLEEmoticon: NSObject {
    /// 表情的描述
    var chs: String?
    /// 表情的图片名字
    var png: String?
    /// 表情类型，如果是图片表情，type 为 "0"，emoji 表情 type 为 "1"
    var type: String?
    /// emoji表情的字符串
    var code: String?
    /// 图片是放在哪个路径下的
    var path: String?
    
    var isEmoji :Bool {
        return type == "1"
    }
    
    // 返回表情图片的全路径
    var fullPath: String {
        return "\(path!)/\(png!)"
    }
    init(dict:[String:AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
    }
    
    override var description: String {
        let keys = ["chs", "code", "type"]
        return dictionaryWithValuesForKeys(keys).description
    }
}
